General usage guide

Very quickstart guide :
- Select a file to view
- Select the data levels to display
- Press "load data".
- Use the mouse wheel to zoom in and out, hold the wheel to rotate the view, shift+wheel to pan the view. In 2D mode, the timeline at the bottom (green vertical bar) and the playback sliders control which slice of the data is currently visible.

For a longer quickstart, consult the Magical Moose.


Tips and Tricks :
All FITS files for viewing must be saved within the same directory as the FRELLED file. Although not strictly necessary, for easy organisation it is good practise to make a copy of the FRELLED master directory for each FITS file you want to view. 

When you have set up a file to display everything you want, save the FRELLED file using BLENDER'S file menu. You can then re-open this file at any time and all your settings will be saved. This is especially useful if you want to create complex contour plots or mask many individual sources.

You can have a 3D and 2D version of the same FITS file saved within a single FRELLED file.

When loading a file, FRELLED will try and use its WCS if present. If not, or if it is of an unrecognised format, it will revert to using pixel values for the coordinates.

Pressing Alt+B activates border select, allowing you to display a slice of the data along the line of sight at an abritrary angle. Left click and drag to define the slice. Press Alt+B again to reveal the hidden data.
(If you accidentally press Ctrl+B, this activates border rendering, which only affects rendered images when saving files. This will show up as a dashed red outline highlighting the area to render, but otherwise does nothing. Press Ctrl+Alt+B to clear this mode.)


Other included scripts :
A few other scripts are included which can help with common issues. These can be run outside of FRELLED like regular Python scripts. To use them, open the .py file and edit the name of the FITS file for input and then run them. All produce new FITS files and leave the original files intact.

1) FixAxes.py
Many files have four-dimensional axes instead of the 3D arrays that FRELLED requires. This script will try and convert them to regular 3D arrays, which is just less hassle then getting FRELLED to work with 4D arrays directly.

2) Normalise.py
Galactic data can feature large-scale structures throughout the entirety of every channel, sometimes varying signficantly in strength from channel to channel within the same cube. This script rescales to normalise it to the user's percentile range specified in each channel (much like the "local" scaling range setting in DS9), making it easier to differentiate between complex structures. A cube produced by this script cannot be used for measuring flux, though contour plots and other maps may be valid. 

3) FitsBaselineSN.py
While the details of data reduction are primarily the responsibility of the user, this script provides a useful but little-used method to clean the data for display. First, at each spatial pixel, a spectrum is extracted and a sigma-clipped polynomial is calculated to fit the baseline. Secondly, and optionally, the spectrum is divided by its sigma-clipped rms, recasting the data in signal-to-noise units. This greatly reduces the contrast in regions dominated by higher spectral rms (typically the spatial edges of a cube) and can make it easier to plot contours and maps than the native flux units. As with the Normalise script, cubes produced in this way cannot be used for flux measurements, but can help with structure-finding.